package com.xjrsoft.module.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.xjrsoft.module.system.entity.Tree;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zlf
 * @since 2024-02-23
 */
@Mapper
public interface TreeMapper extends MPJBaseMapper<Tree> {


    @Select("select name,code from (select * from xjr_tree) t where name like concat('%', #{keyword}, '%')")
    List<Tree> treeList(@Param("keyword") String keyword);
}
